import { reactive } from "@vue/composition-api";

export default function() {
  const pageData = reactive({
    currentPage: 1,
    pageSize: 10,
    total: 100,
    pageSizes: [100, 200, 300, 400]
  });

  //
  const totalCount = (val) => {
    pageData.total = val
  };

  const handleSizeChange = (val) => {
    pageData.pageSize = val;
  };

  const handleCurrentChange = (val) => {
    pageData.currentPage = val;
  };

  return {
    pageData,
    handleSizeChange,
    handleCurrentChange,
    totalCount
  };
}
